package com.forum.entity;

import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.forum.annotation.Excel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.poi.ss.formula.functions.T;

import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;
import java.util.Date;

/**
 * @ClassNamenews
 * @Author Lenovo
 * @Date 2023/12/4 22:40
 */
@Data
@Api("最新资讯表")
@TableName("news")
public class news implements Serializable {
    private static final long serialVersionUID = 1L;

    public news() {

    }

    public news(T t) {
        try {
            BeanUtils.copyProperties(this, t);
        } catch (IllegalAccessException | InvocationTargetException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }

    /** 主键 */
    @ApiModelProperty(value = "主键")
    private Long id;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "创建时间")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date Addtime;

    /** 标题 */
    @Excel(name = "标题")
    @ApiModelProperty(value = "标题")
    private String Title;

    /** 简介 */
    @Excel(name = "简介")
    @ApiModelProperty(value = "简介")
    private String introduction;

    /** 图片 */
    @Excel(name = "图片")
    @ApiModelProperty(value = "图片")

    private String picture;

    /** 内容 */
    @Excel(name = "内容")
    @ApiModelProperty(value = "内容")
    private String Content;
}
